const { pointsModel } = require("../models/pointsModel")


module.exports.getPoints = async function (req, res, next) {
    // 接受前端发送的数据
    const result = await pointsModel.find()
    // console.log("获取到的数据", result);
    if (result.length > 0) {
        res.send({
            message: "获取成功",
            code: 1,
            result
        });
    } else {
        res.send({
            message: "获取失败",
            code: 0
        });
    }
    // 返回数据给前端

}
